/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.cip.esymons.tesoreria.bc;

import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.cip.esymons.tesoreria.be.PagosAcotacion;

/**
 *
 * @author Gilmar
 */
@Stateless
public class PagosAcotacionFacade implements PagosAcotacionFacadeLocal {
    @PersistenceContext
    private EntityManager em;

    public void create(PagosAcotacion pagosAcotacion) {
        em.persist(pagosAcotacion);
    }

    public void edit(PagosAcotacion pagosAcotacion) {
        em.merge(pagosAcotacion);
    }

    public void remove(PagosAcotacion pagosAcotacion) {
        em.remove(em.merge(pagosAcotacion));
    }

    public PagosAcotacion find(Object id) {
        return em.find(PagosAcotacion.class, id);
    }

    public List<PagosAcotacion> findAll() {
        return em.createQuery("select object(o) from PagosAcotacion as o").getResultList();
    }

}
